package mysql

import "gorm.io/gorm"

type Users struct {
	gorm.Model
	Mobile   string `gorm:"type:char(11);not null;comment:手机号"`
	Password string `gorm:"type:varchar(32);not null;comment:密码"`
	Sex      string `gorm:"type:varchar(32);not null;comment:密码"`
	Desc     string `gorm:"type:varchar(100);not null;comment:简介"`
	Address  string `gorm:"type:varchar(30);not null;comment:住址"`
	Work     string `gorm:"type:varchar(30);not null;comment:所在行业"`
}
type Problem struct {
	gorm.Model
	Title        string `gorm:"type:char(11);not null;comment:手机号"`
	ProblemImage string `gorm:"type:varchar(200);not null;comment:图片"`
	Hot          int    `gorm:"type:int(11);not null;comment:问题热度"`
	UserId       int    `gorm:"type:int(11);not null;comment:用户ID"`
}
type Answer struct {
	gorm.Model
	Speak     string `gorm:"type:varchar(100);not null;comment:评论"`
	ProblemId int    `gorm:"type:int(11);not null;comment:问题ID"`
	UserId    int    `gorm:"type:int(11);not null;comment:用户ID"`
}
